<?php
require_once dirname(__FILE__) . '/inc.head.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/styles.css" />
<script src="../../../libs/jquery/jquery-1.9.0.min.js"></script>
<script type="text/javascript" src="js/sliding_effect.js"></script>
<style>
* {
  font-family: Trebuchet MS;
  font-size: 12px;
}
table.form {
  background-color: #fff;
  border-top: 1px solid #aaa;
  border-left: 1px solid #aaa;
  width: 400px;
}
table.form td {
  padding: 3px 5px; 
  vertical-align: top;
}
table.form td.title {
  background-color: #ddd !important;
  border-bottom: 1px solid #aaa;
  border-right: 1px solid #aaa;
  width: 100px;
}
table.form td.content {
  padding: 0;
  border-bottom: 1px solid #aaa;
  border-right: 1px solid #aaa;
}
table.form td.content input {
  width: 98%;
  height: 20px;
  border: 0;
  padding-left: 2px;
}
table.lo {
  width: 100%;
}
table.lo td {
  vertical-align: top;
}
.imgbtn {
  background-image: url(img/save.png);
  background-repeat: no-repeat;
  background-position: 5px 2px;
  padding: 5px 5px 5px 30px;
  border: 1px solid #666;
  background-color: #fff;
  cursor: pointer;
  border-radius: 3px;
  font-family: Lucida Sans Unicode;
}
.imgbtn:hover {
  background-color: #eee;
}
</style>
</head>
<body>
<table class="lo" cellpadding=0 cellspacing=0>
  <tr>
    <td style="width: 200px;"><?php include dirname(__FILE__) . '/inc.left.php'?></td>
    <td style="padding-left: 20px; padding-top: 18px;">
      <form action="<?php echo basename(__FILE__, '.php'); ?>.server.php" method="post">
        <input name="action" value="save" style="display: none;"></input>
        <input name="to" value="<?php echo MiscUtils::curPageURL(); ?>" style="display: none;"></input>
        <table class="form" cellpadding=0 cellspacing=0>
          <tr>
            <td class="title">Account</td>
            <td class="content"><input type="text" name="account" <?php if (isset($_SESSION['account'])) { echo 'value="' . $_SESSION['account'] . '"'; } else { echo 'value="' . $_SESSION['index' . USER]->account . '"'; } ?>></input><?php if (isset($_SESSION['account_err'])) { ?><div style="color: red;"><?php echo $_SESSION['account_err']; ?></div><?php } ?></td>
          </tr>
          <tr>
            <td class="title">First Name</td>
            <td class="content"><input type="text" name="first_name" <?php if (isset($_SESSION['first_name'])) { echo 'value="' . $_SESSION['first_name'] . '"'; } else { echo 'value="' . $_SESSION['index' . USER]->first_name . '"'; } ?>></input><?php if (isset($_SESSION['first_name_err'])) { ?><div style="color: red;"><?php echo $_SESSION['first_name_err']; ?></div><?php } ?></td>
          </tr>
          <tr>
            <td class="title">Last Name</td>
            <td class="content"><input type="text" name="last_name" <?php if (isset($_SESSION['last_name'])) { echo 'value="' . $_SESSION['last_name'] . '"'; } else { echo 'value="' . $_SESSION['index' . USER]->last_name . '"'; } ?>></input><?php if (isset($_SESSION['last_name_err'])) { ?><div style="color: red;"><?php echo $_SESSION['last_name_err']; ?></div><?php } ?></td>
          </tr>
          <tr>
            <td class="title">Phone</td>
            <td class="content"><input type="text" name="phone" <?php if (isset($_SESSION['phone'])) { echo 'value="' . $_SESSION['phone'] . '"'; } else { echo 'value="' . $_SESSION['index' . USER]->phone . '"'; } ?>></input><?php if (isset($_SESSION['phone_err'])) { ?><div style="color: red;"><?php echo $_SESSION['phone_err']; ?></div><?php } ?></td>
          </tr>
        </table>
        <div>&nbsp;</div>
        <input type='submit' value="Save" class="imgbtn"></input>
      </form>
    </td>
  </tr>
</table>
</body>
</html>